%% Double Angle B1 Mapping Script
%

%% Prepare Workspace
% Clear all variables, and clear the command window.

clear
clc

%% Set the Double Angle input sequence parameters.
% 

NominalAngle=60;    % Nominal flip angle (degrees)

%% Load the minc images into the Workspace
% Note that using the "loadminc" inputs the data into an in32 format.

doubang1 = loadminc('boudreau_test_20120207_141455_22_mri.mnc');
doubang2 = loadminc('boudreau_test_20120207_141455_23_mri.mnc');

%% Call DoubleAngleB1Map function.
% This function calculates the B1 maps using two spin echo alpha-twoalpha 
% images, and the nominal flip angle (NominalAngle).

b1map=DoubleAngleB1Map(doubang1,doubang2,NominalAngle);

%% B1 map plots
% 

imagesc(b1map(:,:,1));
